<?php
class signInMod extends MY_Model{
	
	function signInMod(){
		parent::__construct(
			"member",
			array(
				'id_member',
				'username',
				'password'
			),
			array("id_member")
		);
	}
	
	function validate($user,$pass){
//		$where = "username=$user and pass=$pass";
		$where = array(
			'username' => $user,
			'password' => $pass
		);
		$query = $this->db->get_where($this->table_name, $where);
			if ($query->num_rows() > 0){
				
				return true;
			} else {
				return false;
			}
	}
	
}